package com.chenglin.picturesharedemo;

import android.app.Dialog;
import android.content.Context;
import android.graphics.Bitmap;
import android.media.Image;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;

/**
 * @Author: 程林
 * @CreateDate: 2022/2/23$ 13:30$
 */
public class PictureDialog extends Dialog {

    private Bitmap bitmap;
    private Context context;
    public PictureDialog(@NonNull Context context,Bitmap bitmap) {
        super(context);
        this.context = context;
        this.bitmap = bitmap;
    }



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        View inflate = LayoutInflater.from(context).inflate(R.layout.picture_dialog_layout,null,false);
        setContentView(inflate);
        ImageView image = inflate.findViewById(R.id.iv_share);
        Glide.with(context).load(bitmap).into(image);
    }
}
